<%@ page language="java" pageEncoding="UTF-8"%>
<div ng-controller="FileUpdateController">

	<div class="alert alert-danger" ng-show="upload.error!=null && !upload.uploading">
		<i class="glyphicon glyphicon-remove"></i> {{upload.error}}
	</div>
	
	<div ng-show="upload.success">
		<div class="alert alert-success">
			<i class="glyphicon glyphicon-ok-sign"></i> 上传成功! 地址为: {{upload.success_path}}
		</div>
		<br/>
	</div>
	
	<div class="clearfix">
		<div class="form-group">
			<input id="file" type="file" name="file" ng-model="upload.path" rule="required;"/>
		</div>
		<div class="form-group">
			<button type="button" class="btn btn-success btn-sm pull-right" ng-click="cancel()">
				<i class="glyphicon glyphicon-ok-sign"></i> 完成
			</button>
		</div>
	</div>
	
	<link rel="stylesheet" type="text/css" href="${Constants.STATIC_PATH}/js/jquery/jquery.uploadify/uploadify.css" />

</div>

<!--  old

<div ng-controller="FileUpdateController">

	<div class="alert alert-danger" ng-show="upload.error!=null && !upload.uploading">
		<i class="glyphicon glyphicon-remove"></i> {{upload.error}}
	</div>
		
	<div ng-show="!upload.success">
	
		<div ng-show="!upload.uploading">
			<form enctype="multipart/form-data" callback="upload" validate>
				<div class="form-group">
					<input type="file" name="file" ng-model="upload.path" rule="required;"/>
				</div>
				<div class="form-group">
					<button type="submit" class="btn btn-success btn-sm">
						<i class="glyphicon glyphicon-upload"></i> 上传
					</button>
					
					<button type="button" class="btn btn-danger btn-sm" ng-click="cancel()">
						<i class="glyphicon glyphicon-remove-sign"></i> 取消
					</button>
				</div>
			</form>
		</div>
		
		<div ng-show="upload.uploading">
			<div class="alert alert-warning">
				<i class="glyphicon glyphicon-upload"></i> 正在上传{{upload.path}}..请稍后...
			</div>
			<div class="progress progress-striped active">
				<div class="progress-bar" style="width: 100%" message="'正在上传..请稍后..'" placement="auto" tooltip>
				</div>
			</div>
		</div>
	</div>
	
	<div ng-show="upload.success">
		<div class="alert alert-success">
			<i class="glyphicon glyphicon-ok-sign"></i> 上传成功! 地址为: {{upload.success_path}}
		</div>
		
		<button type="button" class="btn btn-success btn-sm" ng-click="cancel()">
			<i class="glyphicon glyphicon-ok-sign"></i> 确认
		</button>
	</div>
	
</div>

 -->